package com.mikepenz.iconics.typeface.utils;

/**
 * @author pa.gulko zTrap (19.03.2019)
 */
public class IconicsPreconditions {
    private static final IconicsPreconditions INSTANCE = new IconicsPreconditions();

    private IconicsPreconditions() {
    }

    public static IconicsPreconditions getInstance() {
        return INSTANCE;
    }

    /**
     * 检查匹配规则
     *
     * @param str 输入字符串
     * @throws IllegalArgumentException 输入参数异常
     */
    public void checkMappingPrefix(String str) {
        final int max = 3;
        if (str.length() != max) {
            throw new IllegalArgumentException("The mapping prefix of a font must be 3 characters long.");
        }
    }
}
